#include <iostream>
#include <string>
#include "Queue.h"
#include <queue>

using namespace std;


void test_Queue();      // 测试数组实现的队列
void test_queue();      // 测试

int main(int argc, char* argv[])
{
    test_Queue();
    
    test_queue();

    return 0;
}

void test_Queue()
{
    Queue<string>* q = new Queue<string>(4);
    q->enQueue("a");
    q->enQueue("b");
    q->enQueue("c");
    q->enQueue("d");
    cout << "队列已满？ " << (q->isFull() ? "True" : "False") << endl;

    string str;
    q->deQueue(str);
    cout << str << endl;

    q->enQueue("fdsfasdfsadf");
    cout << endl << endl;

    q->traverse();
    cout << endl << endl;
    
    q->deQueue(str);
    cout << str << endl;

    q->deQueue(str);
    cout << str << endl;
    cout << "队列已空？" << (q->isEmpty() ? "True" : "False") << endl;
}

void test_queue()
{
    queue<int> q;
    cout << q.size() << endl;
    q.push(3);
    cout << q.size() << endl;
    // q.emplace(5);
    cout << q.size() << endl;
}
